<?php
Swoole\Coroutine\run(function () {
   $time = microtime(true);
   $barrier = Swoole\Coroutine\Barrier::make();
   for($i = 0; $i < 4; $i++) {
       go(function () use ($barrier) {
          co::sleep(1);
       });
   }
   Swoole\Coroutine\Barrier::wait($barrier);
   echo microtime(true) - $time,PHP_EOL;
});